<template>
	<view class="page-feedback padding">
		<view class="flex flex-direction align-center">
			<textarea maxlength="80" v-model="content" class="textarea" style="width:100%;padding:10rpx 0 0 10rpx;background-color: #fff;" />
			<view style="width:100%" class="flex justify-center">
			<button class="cu-btn round feedback-btn"   @click="handleSend">保存</button>
		</view>
	</view>
  </view>
</template>

<script>
  export default {
    data() {
      return {
        content:""
      };
    },
    methods: {
      async handleSend(){
		  if(!this.content){
			  this.$h.toast('内容不能为空')
			  return
		  }
		  let query={
			  content:this.content
		  }
		  let {code}=await this.$h.api.feedbackModel.postFeedback(query)
		  if(code===1){
			  this.$h.toast("发送成功",true)
			  this.content=""
		  }
	  }
    }
  }
</script>
<style>
  page {
   background-color: #eee;
  }
</style>
<style lang="scss" scoped>
  .page-feedback {
    .img-box-option {
      width: 60rpx;
      height: 60rpx;
    }
	.feedback-btn{
		width:100%;
		margin-top:20rpx;
		background:#E24E47;
		color:#fff;
	}
  }
</style>
